@import "~scss/variables";

.sw-cms-page-form {
    margin: 0 40px;

    &.is--compact {
        .sw-cms-page-form__section-divider {
            width: calc(100% - 140px);
            margin-left: auto;
        }

        .sw-cms-page-form__section-type-label {
            transform: initial;
        }

        .sw-cms-page-form__section-actions {
            position: static;
        }

        .sw-cms-page-form__section-action {
            position: static;
            max-width: $content-width;
            width: 100%;
            margin: 9px auto;

            @media screen and (max-width: 1360px) {
                max-width: 770px;
            }
        }

        .sw-cms-page-form__section-action-label {
            width: 100%;
        }
    }

    .sw-cms-page-form__element-config {
        margin-bottom: 22px;
        border-bottom: 1px solid $color-gray-300;

        &:last-child {
            margin-bottom: 0;
            border-bottom: 0 none;
        }
    }

    .sw-cms-page-form__language-warning {
        max-width: $content-width;
        margin: auto;
    }

    .mt-card .mt-card__title {
        width: auto;
        position: static;
        text-align: left;
        font-size: 22px;
    }

    .sw-cms-page-form__block-card {
        margin: 0 auto;
        margin-top: 18px;
    }

    .sw-cms-page-form__block-card + .sw-cms-page-form__block-card {
        margin-top: 60px;
    }

    .sw-cms-page-form__block-card.is--empty {
        box-sizing: border-box;
        height: 230px;
    }

    .sw-cms-page-form__empty-state-text {
        text-align: center;
        height: 20px;
        margin: 85px 0;
        color: $color-gray-500;
    }

    &__section {
        position: relative;
        padding: 50px 30px 70px;
        border-bottom: 2px solid $color-gray-300;
        width: 100%;

        &:first-of-type {
            padding-top: 0;

            .sw-cms-page-form__section-action {
                top: 0;
            }
        }

        &:last-of-type {
            border-bottom: 0 none;
        }
    }

    &__section-actions {
        position: absolute;
    }

    &__section-action {
        display: flex;
        position: relative;
        margin-bottom: 12px;

        &:last-child {
            margin-bottom: 0;
        }
    }

    &__section-action + &__section-type {
        margin-top: 21px;
    }

    &__section-action-icon {
        display: inline-block;
        margin-right: 10px;
        color: $color-gray-900;
    }

    &__section-action-label {
        color: #52667a;
        font-weight: $font-weight-semi-bold;
        line-height: 22px;
        width: 190px;
        word-wrap: break-word;
    }

    &__section-type {
        position: relative;
        display: flex;
        align-items: center;
        margin: 0 auto;
        margin-top: 50px;
        height: 22px;
        max-width: $content-width;
    }

    &__section-type-label {
        position: absolute;
        left: 0;
        top: 0;
        transform: translateX(calc(-100% - 10px));
    }

    &__section-type-name,
    &__section-type-icon {
        margin-right: 10px;
        color: #b3bfcc;
        font-weight: $font-weight-semi-bold;
    }

    &__section-divider {
        position: absolute;
        right: 0;
        width: 100%;
        height: 1px;
        border: 0 none;
        background: #d1d9e0;
    }

    &__device-actions,
    &__block-device-actions {
        width: 96px;
        color: $color-gray-500;
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: flex-end;
    }
}
